getWrapper

abstract fun getWrapper(): Any(source)

Called while this class is being instantiated by the OS. If an object is returned then it will be used in place of the class. Note: this will not be called on API <= 27. Example:

public AndroidXContentProvider extends ContentProvider implements CompatWrapped {
    ...

    public Object getWrapper() {
        if (SDK_INT >= 29) {
            return new AndroidXContentProviderV29(this);
        }
        return null;
    }
}